<template>
	<view class="container">
		<view class="" @click="confirm">
			<image mode="widthFix"
				src="https://images.weserv.nl/?url=https://wx1.sinaimg.cn/mw2000/006Z6VeYly8fl0aq020yjj30ku0ktdha.jpg"
				@error="imageError"></image>
		</view>
	</view>
</template>
 
<script>
	export default {
		watch: {
			watchData: {
				handler(newName, oldName) {
					this.cancel()
				}
			}
		},
		data() {
			return {
				watchData: true,
			}
		},
		onLoad() {
 
		},
 
		methods: {
			confirm: function() { //确定按钮
				console.log('您点击了确定按钮');
				this.watchData = !this.watchData; //改变watchData的值
			},
			cancel: function() { //取消按钮
				console.log('您点击了取消按钮');
			},
 
		},
		
	}
</script>
 
<style scoped>
	car-list {
		width: 100%;
	}
</style>